<?php require_once($_SERVER['DOCUMENT_ROOT'] . '/Prototipo/conexao/ConexaoBanco.php');?>
<html>
	<head></head>
	<body>
		<form class = "form-horizontal" action="validaForm.php" method="post">
			<fieldset >
				<legend><h1>Cadastrar Usu&aacuterio</h1></legend>
				<div id = "nome">
					<label>Nome:</label>
					<input  class= "span6" type="text" name ="nome"> 
				</div>				
				<div id = "email">
					<label>E-mail:</label>
					<input type ="email" name ="email">
				</div>
				<div id = "login">
					<label>Login: </label>
					<input type ="text" name ="login">
				</div>
				<div id = "senha">
					<label>Senha:</label>
					<input type ="password" name ="senha">
				</div>
				<div id= "tipo_usuario">
				<label>Permiss&atildeo do usu&aacuterio:</label>
				<?php
					$banco = new ConexaoBanco();	
					$sql = "SELECT * FROM tipo_usuario";
					$banco->conectar();
					$res = $banco->executarConsulta($sql);
					$banco->desconectar();
				?>
				
				<select name='tpUsr'>
					<?php 
					while($result = mysql_fetch_array($res)){
						echo "<option value='".$result['id_tipo_usuario']."'>".$result['descricao']."</option>";	
					}?>
				</select>
				</div>
				
				<div id = "botao">
					<input type="submit" name ="enviar" value ="confirmar">
				</div>
			</fieldset>
					
		</form>
	</body>
</html>
